const mongoose = require('mongoose');

//连接数据库
mongoose.connect('mongodb://127.0.0.1:27017/test');

//监听连接的情况
mongoose.connection.on('connected', () => { console.log('数据库连接成功') });

// module.exports = mongoose;